]> dgit.raspbian.org Git - grub2.git/commitdiff
fix-for-gcc-2.16-1
authorGRUB Maintainers <pkg-grub-devel@alioth-lists.debian.net>
Wed, 23 Sep 2026 20:39:45 +0000 (21:39 +0100)
committerSteve McIntyre <93sam@debian.org>
Wed, 23 Sep 2026 20:39:45 +0000 (21:39 +0100)
commit 9f4a586f1227a8287e1d6acd95893f6098756ee2
Author: Nicholas Vinson <nvinson234@gmail.com>
Date:   Tue Feb 24 19:48:41 2026 -0500

    util/probe: Save strrchr() ret val to const data ptr

    With glibc-2.43 implementing the C23 standard, strrchr() now returns
    "const char *" when its first argument is "const char *".

    The fix is update all pointers receiving strrchr()'s return value so
    that they are now "const char *" instead of "char *".

Signed-off-by: Nicholas Vinson <nvinson234@gmail.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
Gbp-Pq: Topic upstream
Gbp-Pq: Name fix-for-gcc-2.16-1.patch

util/probe.c

index 81d91cf59bf5655b69eafb4ba42eb6e9d5f63ed7..a9158d640ef0ae195fac07812ad41e990bdd7699 100644 (file)
@@ -70,7 +70,7 @@ char *
 grub_util_guess_bios_drive (const char *orig_path)
 {
   char *canon;
-  char *ptr;
+  const char *ptr;
   canon = grub_canonicalize_file_name (orig_path);
   if (!canon)
     return NULL;
@@ -99,7 +99,7 @@ char *
 grub_util_guess_efi_drive (const char *orig_path)
 {
   char *canon;
-  char *ptr;
+  const char *ptr;
   canon = grub_canonicalize_file_name (orig_path);
   if (!canon)
     return NULL;
@@ -128,7 +128,7 @@ char *
 grub_util_guess_baremetal_drive (const char *orig_path)
 {
   char *canon;
-  char *ptr;
+  const char *ptr;
   canon = grub_canonicalize_file_name (orig_path);
   if (!canon)
     return NULL;